<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>

<html:html lang="true">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title><bean:message key="welcome.title"/></title>
        <html:base/>
    </head>
    <body style="background-color: white">

        <logic:notPresent name="org.apache.struts.action.MESSAGE" scope="application">
            <div  style="color: red">
                ERROR:  Application resources not loaded -- check servlet container
                logs for error messages.
            </div>
        </logic:notPresent>

        <h3><bean:message key="welcome.heading"/></h3>
        <p><bean:message key="welcome.message"/></p>
       
        <html:form action="/Login" onsubmit="return validar(this)">
            Login <div id="avalidar"> <html:text name="Usuario" property="usuario"></html:text></div><br/>
            Password<html:password name="Usuario" property="password"></html:password>
            <html:submit> Loguearse </html:submit>
        </html:form>

        <html:form action="/Login?modo=mostrarPlantilla" onsubmit="return (this)">
            <html:submit> Mostrar Plantilla </html:submit>
        </html:form>

        <html:form action="/Login?modo=mostrarPlantilla2" onsubmit="return (this)">
            <html:submit> Mostrar Heredero 2 </html:submit>
        </html:form>
            
            
            
 <script language="javascript" type="text/javascript" >
function validar(elem){
    if( ! document.getElementById("avalidar").text.contains("!<>&;+[?¡")){
        alert("No contiene algunos caracteres peligrosos");
    }else {
        alert("Contiene alguno de estos caracteres !<>&;+[?¡");
    }
}                           
</script>
    </body>
</html:html>
